//*****************************************************************************
// eventQueueTest.h
//
// Copyright 2009 by Magpie, http://www.magpieti.com
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************

#ifndef EVENT_QUEUE_TEST_H
#define EVENT_QUEUE_TEST_H

#include <stdio.h>
#include <stdlib.h>

typedef unsigned char  boolean;
typedef unsigned char  int8u;
typedef signed   char  int8s;
typedef unsigned int   int16u;
typedef signed   int   int16s;
typedef unsigned long  int32u;
typedef signed   long  int32s;

// Event status as defined by the spec.
enum {
  EVENT_COMMAND_RECEIVED                               = 0x01,
  EVENT_STARTED                                        = 0x02,
  EVENT_COMPLETED                                      = 0x03,
  EVENT_SUPERSEDED                                     = 0x04,
  EVENT_REJECTED_EXPIRED                               = 0x05,
  EVENT_REJECTED                                       = 0x06
};

//#define TRACE_LOGGING
//#define DEBUG_LOGGING

#define assertStatus(index, id, status) if ((statusArray[index].eventId != id) || (statusArray[index].eventStatus != status)) {printf("ERROR[%s].%d Invalid status %d\r\n",TEST_NAME, __LINE__, index); dumpAllStatus(); fail();}

#include "testingSupport.h"
#include "eventQueuePrivate.h"
#include "eventQueue.h"

#endif //EVENT_QUEUE_TEST_H
